#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   85100-ruby.sh
# Version:    1.0
# Date:       2014/04/29
# Author:     huijing.hei
# Email:      huijing.hei@cs2c.com.cn
# Summary:    02系统基本功能-07开发环境-01语言支持-07ruby
# Notes:      ruby语言
# Copyright:  China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2014/04/29
#             -   The first one
# ----------------------------------------------------------------------

trap "CleanData" EXIT INT

if [ "x${SFROOT}" = "x" ];then
    echo "SFROOT is null, pls check"
    exit 1
fi

. ${SFROOT}/lib/Echo.sh

function CleanData ()
{
  rm -rf ${tmpfile}
  EchoInfo "85100-ruby.sh执行完毕"
}


tmpfile="/tmp/hello.rb"

function DoTest ()
{
    echo "puts 'hello world!'" > ${tmpfile}
    [ "`ruby ${tmpfile}`" == "hello world!" ]
    EchoResult "执行ruby文件成功"
}

DoTest
